<template>
  <div class="goods-tabs">
    <nav>
      <a href="javascript:;" @click="flag = 0">商品详情</a>
      <a href="javascript:;" @click="flag = 1">商品评论<span>(500+)</span></a>
    </nav>
    <goods-qx v-if="flag == 0" :details="details"></goods-qx>
    <goods-pj
      v-if="flag == 1"
      :evaluatelist="evaluatelist"
      :evaluatelist2="evaluatelist2"
    ></goods-pj>
    <!-- 注意事项 -->
    <goods-warn></goods-warn>
  </div>
</template>

<script>
import GoodsPj from "./GoodsPj.vue";
import GoodsQx from "./GoodsQx.vue";
import GoodsWarn from "./GoodsWarn.vue";
export default {
  components: { GoodsWarn, GoodsQx, GoodsPj },
  props: ["details", "evaluatelist", "evaluatelist2"],
  data() {
    return {
      flag: 0,
    };
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
@import "@/assets/css/color.scss";
.goods-tabs {
  width: 940px;
  //   min-height: 600px;
  background: #fff;
  nav {
    height: 70px;
    line-height: 70px;
    display: flex;
    border-bottom: 1px solid #f5f5f5;
    a {
      padding: 0 40px;
      font-size: 18px;
      position: relative;
      > span {
        color: $priceColor;
        font-size: 16px;
        margin-left: 10px;
      }
      &:first-child {
        border-right: 1px solid #f5f5f5;
      }
      &.active {
        &::before {
          content: "";
          position: absolute;
          left: 40px;
          bottom: -1px;
          width: 72px;
          height: 2px;
          background: $xtxColor;
        }
      }
    }
  }
}
</style>